package yz.com.javautil.date;

import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;

/**
 * 获取月底
 *
 * @author Administrator
 */
public class GetEndOfMonth {
    public static void main(String[] args) {
        String startTime = "2025-02" + "-01 00:00:00";
        DateTime parse = DateUtil.parse(startTime, "yyyy-MM-dd HH:mm:ss");
        String format = DateUtil.format(DateUtil.endOfMonth(parse), "yyyy-MM-dd HH:mm:ss");
        System.out.println(format);
    }
}
